package com.roadmap.client.module.user;

import java.util.List;
import java.util.Map;

import com.roadmap.common.BaseEntity;
import com.roadmap.common.BaseEnum.ActionType;
import com.roadmap.entities.Aspirant;
import com.roadmap.exception.InvalidActionException;
import com.roadmap.exception.InvalidQueryException;
import com.roadmap.exception.InvalidValueException;
import com.roadmap.exception.NullObjectException;
import com.roadmap.exception.ServerException;
import com.roadmap.repo.db.IDatabaseUtility;

public interface IActRecorder {
	/**
	 * create a activity record when users create or update something.
	 * 
	 * @param entity:
	 *            [Achievement, Assessment, Execution, LifeMap, LifeGoal,
	 *            LifePlan, LifeTask, Summary]
	 * @param type:
	 *            [create, update]
	 */
	@Deprecated
	public void record(BaseEntity entity, ActionType type)
			throws InvalidValueException, InvalidActionException,
			ServerException;

	/** get the aspirant's activities ordered by happen time */
	public List getActivityRecords() throws InvalidValueException,
			InvalidQueryException, ServerException;

	/**
	 * delete an activity record
	 */
	public void delete(String actId) throws NullObjectException,
			ServerException, InvalidActionException;

	/** get the aspirant identified by aspirantId */
	public Aspirant getAspirant() throws NullObjectException,
			InvalidQueryException, ServerException, InvalidValueException;
	
	public void setAspirant(Aspirant asp);
	
	public IDatabaseUtility getDbUtil();

	public String getAspirantId();

	public void setAspirantId(String aspirantId);

	/**
	 * get the array of activities
	 * 
	 * @return map: key - aspirant id; value - a list of activities>
	 */
	public Map<String, List> getActivities() throws InvalidValueException,
			InvalidQueryException, ServerException;
}
